<?php
// Test of R0910CMS
// created by TLightSky
// time : 20100404

class ModelTest extends UnitTestCase {
	private $_m = null;
	function setUp() {
		$this->_m = getInstance("R_Model_Manage");
	}
    
	function testAddModelPath() {
		$eq  = 'assertEqual';
		$rmm = &$this->_m;
		$newModels=$rmm->addPath(TEST_ROOT."testModelAddPath",true);
		$this->assertTrue(in_array('testModel1',$newModels));
		$this->assertTrue(in_array('testModel2',$newModels));
		$rmm->getClass('testModel1');
		try{
			$rmm->getClass('testModelNotExist');
		}catch (R_Exception $e){
			$this->$eq($e->getMessage(),'MVC class testModelNotExist does not exist!');
		}
		
	}
}
